﻿
using System.Data;
using Microsoft.EntityFrameworkCore;
using UtilsORM;
using UtilsORM.MySqlData;

namespace ServiceWeb.DBBase
{
    public class DBBsClientUser
    {

        EFYihongIotContext ef = new EFYihongIotContext();

        public bs_client_user getUser(string cuguid)
        {
            return ef.bs_client_user.Where(c => c.cu_guid == cuguid).FirstOrDefault();
        }



        public bool setPwd(string cuguid, string pwd)
        {
            int count = ef.bs_client_user.Where(c => c.cu_guid == cuguid).ExecuteUpdate(c => c.SetProperty(p => p.cu_pwd, pwd));
            return count > 0;
        }


    }

}
